﻿<div id="recent-news" class="news-list">
    <h3>
        Recent Activity</h3>
    <ul>
        @foreach (var item in ViewBag.RecentActivity)
        {
            if (item != null)
            {
            <li class="group">
                @if (item.AssociatedImageURL != "")
                {
                    <img src="@item.AssociatedImageURL" />
                }
                else
                {
                    <img src="/images/icon_pr_small.png" alt="" />
                }
                @if (item.ActivityType == 1)
                {
                    if (item.LinkURL != null)
                    {
                    <a href="@item.LinkURL">@item.UserName </a>
                    }
                    else
                    {
                    @Html.ActionLink((string)item.UserName, "User", "Stats", new { id = item.UserName.ToString() }, null)
                    }
                    @item.Activity <!--<span>@item.ActivityDate</span> -->
                }
@if (item.ActivityType == 2)
                {
                    if (item.LinkURL != null)
                    {
                    <a href="@item.LinkURL">@item.Activity </a>
                    }
                    else
                    {
                    @Html.ActionLink((string)item.UserName, "User", "Stats", new { id = item.UserName.ToString() }, null)
                    }
                    @item.UserName 
                }
                
            </li>
            }
        }
    </ul>
</div>
<!-- /recent-news -->
